package com.leicx.guli.order.config;

import com.leicx.guli.order.interceptor.LoginUserInterceptor;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author daxiong
 * @date 2022/8/9 上午10:53
 */
@SpringBootConfiguration
public class OrderWebConfiguration implements WebMvcConfigurer {

    @Resource
    LoginUserInterceptor loginUserInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginUserInterceptor).addPathPatterns("/**");
    }
}
